home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambb2spatha.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  101 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbB2SPathA.cog
  4. #
  5. # Plays random ambient sounds at random positions and drops
  6. # snow at all the positions all the time.
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        entered
  16.     message     pulse
  17.  
  18.     thing        soundPos0        nolink
  19.     thing        soundPos1        nolink
  20.     thing        soundPos2        nolink
  21.     thing        soundPos3        nolink
  22.     thing        soundPos4        nolink
  23.     thing        soundPos5        nolink
  24.     thing        soundPos6        nolink
  25.     thing        soundPos7        nolink
  26.     
  27.     sector      start_Amb1      linkID=1
  28.     sector      start_Amb2      linkID=1
  29.     sector      start_Amb3      linkID=1
  30.     
  31.     sector      stop_Amb1       linkID=0
  32.     sector      stop_Amb2       linkID=0
  33.     
  34.     sound        ambient0=shw_amb1.wav   local
  35.     sound        ambient1=shw_amb2.wav   local
  36.     sound        ambient2=shw_amb3.wav   local
  37.     sound        ambient3=shw_amb4.wav   local
  38.     sound        ambient4=shw_amb5.wav   local
  39.     sound        ambient5=shw_amb6.wav   local
  40.     sound        ambient6=shw_amb7.wav   local
  41.     
  42.     template    tpl_Snow=skitosnow      local
  43.     
  44.     int         playing=0               local
  45.     
  46.     int         randNum                 local
  47.     sound       snd_Wolf=fol_wolf_talk.wav      local
  48.     
  49. end
  50.  
  51. # ========================================================================================
  52.  
  53. code
  54.  
  55. entered:
  56.  
  57.     if((GetSenderID() == 1) && (playing == 0))
  58.     {
  59.         playing = 1;
  60.         setpulse(2.0);
  61.     }
  62.     
  63.     if(GetSenderID() == 0)
  64.     {
  65.         playing = 0;
  66.         SetPulse(0.0);
  67.     }
  68.     
  69.     return;
  70.  
  71. # ========================================================================================
  72.  
  73. pulse:
  74.  
  75.     PlaySoundThing(ambient0[RandBetween(0, 6)], soundPos0[RandBetween(0, 7)], 1.0, 15, 30, 0);
  76.     
  77.     randNum = RandBetween(1, 10);
  78.     
  79.     if(randNum == 5)
  80.     {
  81.         PlaySoundThing(snd_Wolf, soundPos0[RandBetween(0, 7)], 0.5, 15, 30, 0);
  82.     }
  83.     
  84.     if(GetPerformanceLevel() >= 2)
  85.     {
  86.         CreateThing(tpl_Snow, soundPos0);        
  87.         CreateThing(tpl_Snow, soundPos1);        
  88.         CreateThing(tpl_Snow, soundPos2);        
  89.         CreateThing(tpl_Snow, soundPos3);        
  90.         CreateThing(tpl_Snow, soundPos4);
  91.         CreateThing(tpl_Snow, soundPos5);
  92.         CreateThing(tpl_Snow, soundPos6);
  93.         CreateThing(tpl_Snow, soundPos7);
  94.     }
  95.     
  96.     return;
  97.  
  98. # ========================================================================================
  99.  
  100. end
  101.